<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> js单例模式 </title>
  <meta charset="utf-8">
 </head>

 <body>
  <script>
	var msg = function(){
		var hi = 'js单例模式';
		return {
			print:function(){
				 alert(hi);
			}
		}
	}
	msg().print();
  </script>
 </body>
</html>
